package com.vm.osm.business.service.impl;

import com.vm.osm.business.common.exception.BusinessException;
import com.vm.osm.business.dao.OsmLogicEquPartMapper;
import com.vm.osm.business.entity.OsmLogicEquPart;
import com.vm.osm.business.service.IOsmLogicEquPartService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

@Service
public class OsmLogicEquPartServiceImpl
        extends AbstractServiceImpl<OsmLogicEquPart, String> implements IOsmLogicEquPartService {
    private OsmLogicEquPartMapper mapper;

    public OsmLogicEquPartServiceImpl(OsmLogicEquPartMapper mapper) {
        super(mapper);
        this.mapper = mapper;
    }

    @Override
    public int deleteByEquId(String equ_id) {
        if (StringUtils.isEmpty(equ_id)) throw new BusinessException("设备Id为空");
        return mapper.deleteByEquId(equ_id);
    }
}
